<?php
declare (strict_types = 1);

namespace app\admin\controller\admin;

use think\facade\Request;
use think\facade\View;
use app\common\service\AdminZbuserinfo as S;
use app\common\model\AdminZbuserinfo as M;

class Zbuserinfo extends  \app\admin\controller\Base
{
    protected $middleware = ['AdminCheck','AdminPermission'];

    // 列表
    public function index(){
        $biaoid = input('id');
        View::assign('biaoid', $biaoid);

        $qitaxiang = S::goQitaxiang($biaoid);
        View::assign('qitaxiang', $qitaxiang['data']['qitaxiang']);

        $shuju = S::goTubiaoshuju($biaoid);
        View::assign('shujuyi',$shuju['data']['yi']);
        View::assign('shujuer',$shuju['data']['er']);
        View::assign('shujusan',$shuju['data']['san']);
        View::assign('shujusi',$shuju['data']['si']);
        if (Request::isAjax()) {
            return $this->getJson(M::getList($biaoid));
        }
        return $this->fetch();
    }

    // 删除
    public function remove($id){
        return $this->getJson(S::goRemove($id));
        }

    // 导出候选数据
    public function getdata($biaoid){
        return M::goGetdata($biaoid);
    }
}
